/**
 * @Title: Dumpling_KnowPassportActivity.java
 * @Package com.sinoglobal.sinologin.activity.login
 * @Description: TODO(用一句话描述该文件做什么)
 * @author lsh
 * @date 2015-6-1 下午2:55:04
 */
package com.sinoglobal.dumping.activity;

import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.sinoglobal.dumping.R;
import com.sinoglobal.dumping.api.Dumpling_RemoteImpl;
import com.sinoglobal.dumping.base.Dumpling_SinoAsyncTask;
import com.sinoglobal.dumping.base.Dumpling_SinoBaseActivity;
import com.sinoglobal.dumping.base.Dumpling_SinoConstans;
import com.sinoglobal.dumping.bean.Dumpling_PassportVo;


/**
 * @author lsh
 * @createdate 2015-6-1 下午2:55:04
 * @Description: TODO(用一句话描述该类做什么)了解信诺通行证类
 */
public class Dumpling_KnowPassportActivity extends Dumpling_SinoBaseActivity {
	private TextView title;
	private TextView message;
	private String type = "2";
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
        
        View view = getView(R.id.title_right_btn_share);
        hideView(mTemplateRightText, mTemplateRightImg,view);
        mTemplateTitleText.setText("账号说明");
        
        setContentView(R.layout.dumpling_activity_knowpassport);
        
		init();
	}


	public void init() {
		title = (TextView)this.findViewById(R.id.tv_title);
		message = (TextView)this.findViewById(R.id.tv_message);
		getMessageData();
	}


	
	private void getMessageData(){
		new Dumpling_SinoAsyncTask<Void,Void,Dumpling_PassportVo>(Dumpling_KnowPassportActivity.this,true){

            @Override
            public Dumpling_PassportVo before(Void... params) throws Exception {
                return Dumpling_RemoteImpl.getInstance().sinoPassportData(type);
            }

            @Override
            public void after(Dumpling_PassportVo passportVo) {
                if (passportVo.getCode().equals(Dumpling_SinoConstans.LOGIN_SUCCESS_CODE)) {
                    title.setText(passportVo.getTitle());

                    message.setText(passportVo.getContent());
                }
            }

            @Override
            public void exception() {

            }
        }.execute();
	}

    @Override
    public void onAntiViolence(View view) {

    }
}
